今日的行程:
辦公室:9:00 - 18:30
讀書室:19:35 - 19:45
晚上有事情,先記錄點上班看的東西
#0 local_flush_tlb_all () at arch/riscv/include/asm/tlbflush.h:19
#1 setup_vm_final () at arch/riscv/mm/init.c:1151
#2 paging_init () at arch/riscv/mm/init.c:1238
#3 0xffffffff806604b0 in setup_arch () at arch/riscv/kernel/setup.c:279
#4 0xffffffff8065d7c8 in start_kernel () at init/main.c:960
#5 0xffffffff80001178 in _start_kernel () at arch/riscv/kernel/head.S:328
${linux}/arch/riscv/mm/init.c
paging_init -->
setup_bootmem // physical memory allocator
setup_vm_final --> // setting up kernel page table
create_pgd_mapping (swapper_pg_dir /* pgd */, FIXADDR_START /* va */,
/*pa*/, PGDIR_SIZE, PAGE_TABLE /* prot */)
/* Map all memory banks in the linear mapping */
for_each_mem_range(i, &start, &end)
...
/* Map Kernel */
if (IS_ENABLED(CONFIG_64BIT))
create_kernel_page_table(swapper_pg_dir, false);
// switch to new kernel mapping and sfence.vma to make this modification observable
csr_write(CSR_SATP, PFN_DOWN(__pa_symbol(swapper_pg_dir)) | satp_mode);
local_flush_tlb_all();
...